package com.study.cloud.simpleconsumermovie.feign;

import com.study.cloud.config.TestConfiguration2;
import com.study.cloud.simpleconsumermovie.pojo.User;
import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(name = "simple-provider-user", configuration = TestConfiguration2.class)
public interface MovieFeign {

    /*@RequestMapping(value = "/simple/{id}",method = RequestMethod.GET)
    User findById(@PathVariable("id") Long id);

    @RequestMapping(value = "/user",method = RequestMethod.POST)
    User postUser(@RequestBody User user);*/

    @RequestLine("GET /simple/{id}")
    User findById(@Param("id") Long id);


}
